/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package sim.BL;

import sim.DAL.UserProfile;
import sim.DAL.UserLogin;

/**
 *
 * @author rafik
 */

public class Member {

    // Declarations
    private UserLogin userl;
    private UserProfile userp;
    
    //Constructeur vide
    public Member (){}

    //Constructeur qui prend en entrer un username
    public Member (String username){
        userl = new UserLogin (username);
        userp = new UserProfile (userl.getProfileId());
    }

    // Access methods for UserLogin object
    public String getUsername (){
        return userl.getUsername();
    }
    public String getLast_login (){
        return userl.getLastLogin();
    }
    public int getNumber_logins (){
        return userl.getNumberLogins();
    }

    //Sets methods for UserLogin object
    public void setUsername(String username){
        userl.setUsername(username);
    }
    public void setPassword(String username){
        userl.setPassword(username);
    }

     // Access methods for UserProfile object
    public String getFull_name (){
        return userp.getFullName();
    }
    public String getStreet_name (){
        return userp.getStreet();
    }
    public String getCity (){
        return userp.getCity();
    }
    public String getPrvince(){
        return userp.getProvince();
    }
    public String getCountry(){
        return userp.getCountry();
    }
    public String getPostel_code(){
        return userp.getPostelCode();
    }

    //Sets methods for UserLogin object
    public void setFull_name(String full_name){
        userp.setFullName(full_name);
    }
    public void setStreet(String street){
        userp.setStreet(street);
    }
    public void setCity (String city){
        userp.setStreet(city);
    }
    public void setProvince(String province){
        userp.setProvince(province);
    }
    public void setCountry(String country){
        userp.setCountry(country);
    }
    public void setPostel_code(String postel_code){
        userp.setPostelCode(postel_code);
    }
}
